package com.smedi.ismedi.progress.core.application.query.Impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.progress.api.dto.response.ProgressKanBanStatisticResponse;
import com.smedi.ismedi.progress.core.application.command.ProgressKanBanQuery;
import com.smedi.ismedi.progress.core.application.query.ProgressQueryService;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProcessTask;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.Progress;
import com.smedi.ismedi.progress.core.domain.repository.ProgressRepository;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 进度计划查询实现类
 *
 * @author liaojiajie
 * @date 2022/09/16
 */
@Service
@AllArgsConstructor
public class ProgressQueryServiceImpl implements ProgressQueryService {

    private final ProgressRepository progressRepository;
    @Override
    public Page<Progress> getProgressPage(Long offset, Long pageSize,Long hrOrganizationId, Integer projectId, String projectManager, Integer mainCourtyard, Integer status, String projectCategory) {
        return progressRepository.getProgressPage(offset, pageSize,hrOrganizationId,projectId, projectManager,mainCourtyard,status, projectCategory);
    }

    @Override
    public Page<Progress> getProgressPageByApp(Long offset, Long pageSize, Long hrOrganizationId,Integer projectId, String appSearch, Integer progressStatus) {
        return progressRepository.getProgressPageByApp(offset,pageSize,hrOrganizationId,projectId,appSearch,progressStatus);
    }

    @Override
    public Page<Progress> getProgressKanBanPage(ProgressKanBanQuery progressKanBanQuery) {
        return progressRepository.getProgressKanBanPage(progressKanBanQuery);
    }

    @Override
    public ProgressKanBanStatisticResponse getProgressKanStatisticBanPage(Long hrOrganizationId) {
        return progressRepository.getProgressKanStatisticBanPage(hrOrganizationId);
    }

    @Override
    public List<Progress> getProgressKanLagProjectPage(Long hrOrganizationId) {
        return progressRepository.getProgressKanLagProjectPage(hrOrganizationId);
    }

    @Override
    public List<ProcessTask> getProgressScheduleProcess(Long id) {
        return progressRepository.getProgressScheduleProcess(id);
    }
}
